package cn.iocoder.yudao.module.shop.convert.memberhealth;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;

import cn.iocoder.yudao.module.blog.convert.jiutag.BlogJiuTagConvert;
import cn.iocoder.yudao.module.blog.dal.dataobject.jiutag.BlogJiuTagDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.shop.controller.admin.memberhealth.vo.*;
import cn.iocoder.yudao.module.shop.dal.dataobject.memberhealth.ShopMemberHealthDO;

/**
 * 收支记录 Convert
 *
 * @author 芋道源码
 */
@Mapper
public interface ShopMemberHealthConvert {

    ShopMemberHealthConvert INSTANCE = Mappers.getMapper(ShopMemberHealthConvert.class);

    ShopMemberHealthDO convert(ShopMemberHealthCreateReqVO bean);

    ShopMemberHealthDO convert(ShopMemberHealthUpdateReqVO bean);

    ShopMemberHealthRespVO convert(ShopMemberHealthDO bean);

    List<ShopMemberHealthRespVO> convertList(List<ShopMemberHealthDO> list);

    PageResult<ShopMemberHealthRespVO> convertPage(PageResult<ShopMemberHealthDO> page);

    List<ShopMemberHealthExcelVO> convertList02(List<ShopMemberHealthDO> list);

    default ShopMemberHealthRespVO convert(ShopMemberHealthDO bean, List<BlogJiuTagDO> tagList){
        if(bean == null){
            return null;
        }

        ShopMemberHealthRespVO respVO = convert(bean);
        respVO.setTagList(BlogJiuTagConvert.INSTANCE.convertList(tagList));

        return respVO;
    }

}
